# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-geoip
_pkgname=GeoIP
pkgver=1.3.2
pkgrel=1
epoch=1
pkgdesc='MaxMind GeoIP Legacy Database - Python API.'
url='https://pypi.org/project/geoip1/#files'
arch=('x86_64' 'aarch64')
license=('LGPL')
depends=('python2' 'geoip')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('313af794d839e83408b40573566fb55483c1ddd663a7919b54751bc9da85cf855f9eb17d8fdb641702740da5c5d79d79d3d7f15b82fa88092f780d0c667c4e7a')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

